package com.xiaozhaovip.demo.service;

import com.xiaozhaovip.demo.intf.entity.YueQiLaiActivityCollect;
import com.xiaozhaovip.demo.intf.mapper.YueQiLaiActivityCollectMapper;
import com.xiaozhaovip.demo.intf.service.YueQiLaiActivityCollectService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 活动收藏 业务层实现
 *
 * @author Cauli
 */
@Service
public class YueQiLaiActivityCollectServiceImpl implements YueQiLaiActivityCollectService {
    @Resource
    YueQiLaiActivityCollectMapper yueQiLaiActivityCollectMapper;

    @Override
    public int insert(YueQiLaiActivityCollect yueQiLaiActivityCollect) {
        return yueQiLaiActivityCollectMapper.insert(yueQiLaiActivityCollect);
    }

    @Override
    public YueQiLaiActivityCollect loadByUserIdAndActivityId(int userId, int activityId) {
        return yueQiLaiActivityCollectMapper.loadByUserIdAndActivityId(userId, activityId);
    }

    @Override
    public int update(YueQiLaiActivityCollect yueQiLaiActivityCollect) {
        return yueQiLaiActivityCollectMapper.update(yueQiLaiActivityCollect);
    }

    @Override
    public int updateStatusById(int userId, int activityId, int status) {
        return yueQiLaiActivityCollectMapper.updateStatusById(userId, activityId, status);
    }
}
